// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_PICKING_MATERIAL
// * CreateDate    : 2012/4/11 22:33:34
// * Creater       : CodeSmith
// * LastChangeDate: 2012/4/11 22:33:34
// * LastChanger   : 2012/4/11 22:33:34
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdPickingMaterialEntity : EntityBase
    {
        public ProdPickingMaterialTable TableSchema
        {
            get
            {
                return ProdPickingMaterialTable.Current;
            }
        }

        public ProdPickingMaterialEntity()
        {

        }

        public ProdPickingMaterialEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.PickingMaterialId = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_MATERIAL_ID"]));
            this.PlanOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ID"]));
            this.PickingCode = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_CODE"]));
            this.PickingType = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_TYPE"]));
            this.PickingDepartment = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_DEPARTMENT"]));
            this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
            this.PickingPerson = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_PERSON"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.PlanDeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_DELIVERY_DATE"]));
            this.PrintStatus = Convert.ToInt32(CommonFunctions.ToObject(dr["PRINT_STATUS"]));
        }

        public ProdPickingMaterialEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.PickingMaterialId = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_MATERIAL_ID"]));
            this.PlanOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ID"]));
            this.PickingCode = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_CODE"]));
            this.PickingType = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_TYPE"]));
            this.PickingDepartment = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_DEPARTMENT"]));
            this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
            this.PickingPerson = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_PERSON"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.PlanDeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_DELIVERY_DATE"]));
            this.PrintStatus = Convert.ToInt32(CommonFunctions.ToObject(dr["PRINT_STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdPickingMaterialTable.Current;
            }
        }

        #region Perporty List
        public string PickingMaterialId
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_PICKING_MATERIAL_ID)); }
            set { SetData(ProdPickingMaterialTable.C_PICKING_MATERIAL_ID, value); }
        }

        public string PlanOrderId
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_PLAN_ORDER_ID)); }
            set { SetData(ProdPickingMaterialTable.C_PLAN_ORDER_ID, value); }
        }

        public string PickingCode
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_PICKING_CODE)); }
            set { SetData(ProdPickingMaterialTable.C_PICKING_CODE, value); }
        }

        public string PickingType
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_PICKING_TYPE)); }
            set { SetData(ProdPickingMaterialTable.C_PICKING_TYPE, value); }
        }

        public string PickingDepartment
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_PICKING_DEPARTMENT)); }
            set { SetData(ProdPickingMaterialTable.C_PICKING_DEPARTMENT, value); }
        }

        public string WarehouseCode
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_WAREHOUSE_CODE)); }
            set { SetData(ProdPickingMaterialTable.C_WAREHOUSE_CODE, value); }
        }

        public string PickingPerson
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_PICKING_PERSON)); }
            set { SetData(ProdPickingMaterialTable.C_PICKING_PERSON, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_REMARK)); }
            set { SetData(ProdPickingMaterialTable.C_REMARK, value); }
        }

        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(ProdPickingMaterialTable.C_CREATED_DATE)); }
            set { SetData(ProdPickingMaterialTable.C_CREATED_DATE, value); }
        }

        public string CreatedBy
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_CREATED_BY)); }
            set { SetData(ProdPickingMaterialTable.C_CREATED_BY, value); }
        }

        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(ProdPickingMaterialTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(ProdPickingMaterialTable.C_LAST_MODIFIED_DATE, value); }
        }

        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_LAST_MODIFIED_BY)); }
            set { SetData(ProdPickingMaterialTable.C_LAST_MODIFIED_BY, value); }
        }

        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(ProdPickingMaterialTable.C_APPROVED_DATE)); }
            set { SetData(ProdPickingMaterialTable.C_APPROVED_DATE, value); }
        }

        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_APPROVED_BY)); }
            set { SetData(ProdPickingMaterialTable.C_APPROVED_BY, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialTable.C_STATUS)); }
            set { SetData(ProdPickingMaterialTable.C_STATUS, value); }
        }

        public DateTime PlanDeliveryDate
        {
            get { return Convert.ToDateTime(GetData(ProdPickingMaterialTable.C_PLAN_DELIVERY_DATE)); }
            set { SetData(ProdPickingMaterialTable.C_PLAN_DELIVERY_DATE, value); }
        }

        public int PrintStatus
        {
            get { return Convert.ToInt32(GetData(ProdPickingMaterialTable.C_PRINT_STATUS)); }
            set { SetData(ProdPickingMaterialTable.C_PRINT_STATUS, value); }
        }

        #endregion
    }


}

